function task_bkp {
	if RepoIsEmpty task
	then
		echo "The Repository is empty"
	else
		config add ~/.taskrc
		config add ~/.task
		echo -n "Do you want to describe your commit [y/N]?"
		read -k 1 CONFIRM

		case $CONFIRM in
			Y|y)
				echo -n -e "\nInput your commit description:"
				read Des;;
			*)
				Des=1;;
		esac

		if [ $Des -eq 1 ]
		then
			config commit -m "auto backup task config($(date +%F))" > /dev/null
		else
			config commit -m "$Des" > /dev/null
		fi

		config push origin master > /dev/null
		if [ $? -eq 0 ]
		then
			echo "Your task data backup complete"
		else
			echo "Something wrong with your task data backup"
		fi
	fi
}

task_bkp
